package com.woniuxy.homepage.core.mapper;

import com.woniuxy.homepage.core.model.CarGoods;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author gmx
 * @since 2021-06-29
 */
public interface CarGoodsMapper extends BaseMapper<CarGoods> {

    @Select("select * from car_goods where flag = 0 and goods_style = 1")
    List<CarGoods> selectAllTyre();

    @Select("select * from car_goods where flag = 0 and goods_style = 2")
    List<CarGoods> selectAllSound();

    @Select("select * from car_goods where flag = 0 and recommend = 1")
    List<CarGoods> selectBoutique();

    List<CarGoods> selectGoodsManage();

    @Select("select * from car_goods where id = #{id}")
    CarGoods selectByGoodsId(Integer id);

    List<CarGoods> selectGoods(CarGoods carGoods);
}
